package com.xuanwei.core.entity.param;

import com.xuanwei.core.annos.Contain;
import com.xuanwei.core.annos.Positive;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;

/**
 * @Author jiangyong
 * @Description TODO
 * @Date 2019/7/31 11:05
 **/
@Data
public class Navigate {

    /**
     * ID
     */
    private Integer id;

    /**
     * 导航名称
     */
    @Length(min = 2, max = 10, message = "名称格式错误")
    private String name;

    /**
     * 背景色
     */
    private String bgColor;

    /**
     * 0展示1不展示
     */
    @Contain(values = {0, 1}, message = "展示参数错误")
    private Integer showStatus;

    /**
     * 图片
     */
    private String bgImage;

    /**
     * 位置1爆款热销2掌柜推荐3配件专区4新品上市5活动商品6为您推荐
     */
    @Contain(values = {1, 2, 3, 4, 5, 6}, message = "位置参数错误")
    private Integer position;

    @Positive(containZero = true, message = "排序参数错误")
    private Integer orderBy;

}
